package com.example.blog.module.utils;

/**
 * @author 郑家莽
 */
public class RedisKeyUtil {

    private static final String SPLIT = ":";
    private static final String PREFIX_ENTITY_LIKE = "like:entity";
    private static final String PREFIX_ENTITY_FOLLOW = "follow:entity";
    private static final String PREFIX_ENTITY_FANS = "fans:entity";

    public static String getEntityLikeKey(String entityType,Long entityId){
        return PREFIX_ENTITY_LIKE+SPLIT+entityType+SPLIT+entityId;
    }

    public static String getEntityFollowKey(String entityType,Long entityId){
        return PREFIX_ENTITY_FOLLOW+SPLIT+entityType+SPLIT+entityId;
    }

    public static String getEntityFansKey(String entityType,Long entityId){
        return PREFIX_ENTITY_FANS+SPLIT+entityType+SPLIT+entityId;
    }

}
